package com.gwtintegration.smartrfsandbox.client.gin;

import com.google.gwt.core.shared.GWT;
import com.google.gwt.inject.client.AbstractGinModule;
import com.google.inject.Provides;
import com.google.inject.Singleton;
import com.google.web.bindery.event.shared.EventBus;
import com.google.web.bindery.event.shared.SimpleEventBus;
import com.gwtintegration.smartrfsandbox.shared.SandboxResquestFactory;

public class MainGinModule extends AbstractGinModule {

	@Override
	protected void configure() {
		bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class);

	}

	@Provides
	@Singleton
	public SandboxResquestFactory getSandboxResquestFactory(EventBus eventBus) {
		SandboxResquestFactory factory = GWT.create(SandboxResquestFactory.class);
		factory.initialize(eventBus);
		return factory;
	}

}
